package com.avic.rong.api;

import com.example.minato.minastore.BaseApi;
import com.example.minato.minastore.BaseResultEntity;
import com.example.minato.minastore.listener.HttpOnNextListener;
import com.trello.rxlifecycle2.components.support.RxAppCompatActivity;

import io.reactivex.Observable;
import retrofit2.Retrofit;

/**
 * Creater: Created by wangyz on 2018/12/12.
 * Email: 936804097@qq.com
 */
public class SendCodeApi extends BaseApi<BaseResultEntity> {


    private String mobile;
    private Integer codeType;
    private String sign;

    public SendCodeApi(RxAppCompatActivity rxAppCompatActivity, HttpOnNextListener listener) {
        super(rxAppCompatActivity, listener);
    }

    public void setArguments(String mobile, Integer codeType,String sign){
        this.mobile = mobile;
        this.codeType = codeType;
        this.sign = sign;
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpPostService postService = retrofit.create(HttpPostService.class);
        return postService.sendCode(mobile, codeType,sign);
    }
}
